
const {ccclass, property} = cc._decorator;

@ccclass
export default class NumberGrid extends cc.Component {

    @property(cc.Node)
    Bg: cc.Node = null;
    @property(cc.Label)
    BgLabel :cc.Label = null;
    id:number = null;
    @property(cc.Node)
    BgColor:cc.Node = null
    
    // onLoad () {}

    start () {

    }

    // update (dt) {}
    setContent(nodeWidth,num:number){
        this.BgLabel.string = ""+num;
        this.node.width = nodeWidth;
        this.node.height = nodeWidth;
        this.Bg.width = nodeWidth;
        this.Bg.height = nodeWidth;
        this.BgColor.width = nodeWidth;
        this.BgColor.height = nodeWidth;
        this.Bg.color = cc.color(0,255,69);
        this.id = num
    }

    clickGrid(){
        cc.log(1);
        this.node.parent.getComponent("SevenGrid").solveProduce(this.id,this.node);
    }
}
